-
Notifications
You must be signed in to change notification settings - Fork 373
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat:add request check callback #384
Conversation
user can set callback,check request and early response.
Code Coverage Report
|
Codecov ReportPatch coverage:
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. Additional details and impacted files@@ Coverage Diff @@
## master #384 +/- ##
==========================================
+ Coverage 62.86% 63.28% +0.42%
==========================================
Files 208 208
Lines 12407 12446 +39
==========================================
+ Hits 7800 7877 +77
+ Misses 4607 4569 -38
☔ View full report in Codecov by Sentry. |
加一下测试。 |
Add test done. At the same time find a error in coro client, when request body is bigger than limitation server will return 413 code, but client get code is 404,client don't get correct http status code. |
Code Coverage Report
|
Code Coverage Report
|
d5b4be7
to
b7a5bf1
Compare
Code Coverage Report
|
@@ -403,6 +416,8 @@ inline std::string_view to_string(status_type status) { | |||
return not_found; | |||
case status_type::conflict: | |||
return conflict; | |||
case status_type::entity_too_large: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no ut for 413?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no ut for 413?
coro client get code is 404,don't know why?postman test it that return http code is 413
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as fowllowing code, can limit client request behavior.
set_body_check 1st parameter is callback, second is response string.